import { defineConfig } from 'rollup';
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
import pkg from './package.json' assert { type: 'json' };

export default defineConfig({
    input: 'src/index.ts',
    output: [
        {
            format: 'umd',
            file: pkg.main,
            name: pkg.name,
        },
        {
            format: 'es',
            file: pkg.module,
        }
    ],
    plugins: [
        typescript(),
        terser(),
    ]
});